package serialize.cases;

import java.io.Serializable;
import java.util.List;

public class TextBody {
  private static final long serialVersionUID = -2574642009979115837L;
  protected String text;
  protected List<String> atUids;
  protected Quote quote;

  public TextBody() {
  }

  public TextBody(String text) {
    this.text = text;
  }

  public TextBody(String text, List<String> atUids) {
    this.text = text;
    this.atUids = atUids;
  }

  public TextBody(String text, List<String> atUids, Quote quote) {
    this.text = text;
    this.atUids = atUids;
    this.quote = quote;
  }

  public String getText() {
    return text;
  }

  public void setText(String text) {
    this.text = text;
  }

  public List<String> getAtUids() {
    return atUids;
  }

  public void setAtUids(List<String> atUids) {
    this.atUids = atUids;
  }

  public Quote getQuote() {
    return quote;
  }

  public void setQuote(Quote quote) {
    this.quote = quote;
  }

  @Override
  public String toString() {
    return "TextBody{" +
        "text='" + text + '\'' +
        ", atUids=" + atUids +
        ", quote=" + quote +
        '}';
  }

  public enum QuoteType implements Serializable {
    TEXT,
    IMAGE,
  }

  public static class Quote implements Serializable {
    private static final long serialVersionUID = -8378094779368485608L;

    private QuoteType quoteType;
    private String from;
    private long quoteMsgId;
    private long rootMsgId;
    private String textContent;
    private String imageUrl;
    private MsgBody quoteMsgData;

    public QuoteType getQuoteType() {
      return quoteType;
    }

    public void setQuoteType(QuoteType quoteType) {
      this.quoteType = quoteType;
    }

    public String getFrom() {
      return from;
    }

    public void setFrom(String from) {
      this.from = from;
    }

    public long getQuoteMsgId() {
      return quoteMsgId;
    }

    public void setQuoteMsgId(long quoteMsgId) {
      this.quoteMsgId = quoteMsgId;
    }

    public long getRootMsgId() {
      return rootMsgId;
    }

    public void setRootMsgId(long rootMsgId) {
      this.rootMsgId = rootMsgId;
    }

    public String getTextContent() {
      return textContent;
    }

    public void setTextContent(String textContent) {
      this.textContent = textContent;
    }

    public String getImageUrl() {
      return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
      this.imageUrl = imageUrl;
    }

    public MsgBody getQuoteMsgData() {
      return quoteMsgData;
    }

    public void setQuoteMsgData(MsgBody quoteMsgData) {
      this.quoteMsgData = quoteMsgData;
    }

    @Override
    public String toString() {
      return "Quote{" +
          "quoteType=" + quoteType +
          ", from='" + from + '\'' +
          ", quoteMsgId=" + quoteMsgId +
          ", rootMsgId=" + rootMsgId +
          ", textContent='" + textContent + '\'' +
          ", imageUrl='" + imageUrl + '\'' +
          ", quoteMsgData=" + quoteMsgData +
          '}';
    }
  }
}
